From: Roger Pau Monne Date: Tue, 20 Dec 2011 07:31:40 +0000 (+0100) Subject: blktap2/vhd: add -liconv when linking if using libiconv X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9272 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=a69dda2bcef661c81b88b52053eef4369cb11b01;p=xen.git blktap2/vhd: add -liconv when linking if using libiconv If libiconv is detected on the system add -liconv when linking the libvhd library. If -liconv is not added when compiling libvhd with libiconv the following error occours when linking vhd-util and vhd-update: gcc -o vhd-util vhd-util.o -Llib -lvhd lib/libvhd.so: undefined reference to `libiconv_open' lib/libvhd.so: undefined reference to `libiconv_close' lib/libvhd.so: undefined reference to `libiconv' Signed-off-by: Roger Pau Monne Committed-by: Ian Jackson Acked-by: Ian Jackson --- diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile index 97379c117e..b72e4d9565 100644 --- a/tools/blktap2/vhd/lib/Makefile +++ b/tools/blktap2/vhd/lib/Makefile @@ -23,6 +23,10 @@ ifeq ($(CONFIG_Linux),y) LIBS := -luuid endif +ifeq ($(CONFIG_LIBICONV),y) +LIBS += -liconv +endif + LIB-SRCS := libvhd.c LIB-SRCS += libvhd-journal.c LIB-SRCS += vhd-util-coalesce.c